package com.sxpi.chapter.controller;

import com.sxpi.chapter.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 董伟豪
 * @Date: 2022/12/30 16:44
 */
@RestController
@Slf4j
public class UserController {

    @Autowired
    private IUserService userService;

    @PostMapping("/user/buy/course")
    public String payVip(){
        Long userId = 1L;
        Long courseId = 1L;
        return userService.buyCourse(userId, courseId);
    }

    @PostMapping("/user/buy/coursedesign")
    public String payVipDesign(){
        Long userId = 1L;
        Long courseId = 1L;
        return userService.buyCourseDesign(userId, courseId);
    }
}
